<?php
class Agitum_View_Helper_FormReference extends Zend_View_Helper_Abstract
{
	private $xhtml = '';
	
	public function formReference($name, $attribs = null)
    {
    	$this->view->headScript()->appendFile('/js/form.reference.js');
    	
    	$textHelper = new Zend_View_Helper_FormText();
    	$textHelper->setView($this->view);
    	
        $this->xhtml .= $textHelper->formText($name.'[title]', '', array());
        
        $buttonHelper = new Zend_View_Helper_FormButton();
    	$buttonHelper->setView($this->view);
    	$this->xhtml .= $buttonHelper->formButton($name.'[button]', 'tree', array());
        
        $hiddenHelper = new Zend_View_Helper_FormHidden();
        $hiddenHelper->setView($this->view);
        $this->xhtml .= $hiddenHelper->formHidden($name.'[id]', '', array());

        return $this->xhtml;
    }
}